package com.lhd.service.impl;

import com.lhd.mapper.UserGarbageMapper;
import com.lhd.service.UserGarbageService;
import com.lhd.utils.ThreadLocalUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.Map;

@Service
public class UserGarbageServiceImpl implements UserGarbageService {
    @Autowired
    private UserGarbageMapper userGarbageMapper;
    @Override
    public void add(Integer gid, LocalDateTime localDateTime) {
        Map<String,Object> map = ThreadLocalUtil.get();
        Integer id = (Integer) map.get("id");
        userGarbageMapper.add(id,gid,localDateTime);
    }
}
